package com.cos.hospital.ui.usercenter;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.cos.hospital.R;
import com.cos.hospital.init.BaseActivity;
import com.cos.hospital.tool.UTxt;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @Description: 消息详情
 * @Author: Kosmos
 * @Date: 2018年09月15日 23:15
 * @Email: KosmoSakura@foxmail.com
 */
public class MyMsgDetailActivity extends BaseActivity {
    @BindView(R.id.u_msg_time)
    TextView tTime;
    @BindView(R.id.u_msg_title)
    TextView tTitle;
    @BindView(R.id.u_msg_main)
    TextView tMain;

    @Override
    protected int layout() {
        return R.layout.activity_my_msg_detail;
    }

    @Override
    protected void init() {
        setTitleLeftIcon();
        setTitleCenterTxt(getString(R.string.msg_detail));
    }

    @Override
    protected void logic() {
        Intent intent = getIntent();
        tTime.setText(UTxt.isNull(intent.getStringExtra("time"), "------"));
        tTitle.setText(UTxt.isNull(intent.getStringExtra("title"), "关于治未病的技术研讨会"));
        tMain.setText(UTxt.isNull(intent.getStringExtra("msg"), "------"));
    }

    @OnClick({R.id.title_back})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
                finish();
                break;
        }
    }
}
